package com.john.design.七大原则.开闭原则;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/8/9 15:35
 */
public class Test {
    public static void main(String[] args) {
        ICourse javaCourse = new JavaDiscountCourse(96,"Java从零开始",111d);
        JavaDiscountCourse javaDiscountCourse = (JavaDiscountCourse)javaCourse;
        System.out.println("课程ID == "+ javaCourse.getId());
        System.out.println("课程名称 == "+ javaCourse.getName());
        System.out.println("课程价格 == "+ javaCourse.getPrice());
        System.out.println("原价是==="+ javaDiscountCourse.getOriginPrice());
    }
}
